

Ext.require([
	'Ext.data.proxy.Rest'
]);

/**
 * 
 */
Ext.define('SnowMIS.store.AppProxy', {
	extend : 'Ext.data.proxy.Rest'
	, alias : 'proxy.app'
	, listeners : {
		exception : function(proxy, response, operation, eOpts) {
			var responseText = response.responseText;
			var json = Ext.JSON.decode(responseText);
			var message = json.message || '未知异常！';
			Ext.Msg.alert('警告', message, function() {
				var code = json.code || '200000';
				if (code == '200201') {
					window.location.href = "login.jsp";
				}
			});
		}
	}
});
